package com.dowsure.apisaas.model;

import com.dowsure.apisaas.annotation.RequestParamValidated;
import com.dowsure.apisaas.enums.CurrencyEnums;
import com.dowsure.apisaas.util.DowsureDateUtils;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @program: apisaas-sdk
 * @description: 还款计划
 * @author: Dowsure
 * @create: 2022-02-15 17:17
 **/
@Data
public class Repayment {

    /**
     * 当前期数
     */
    @RequestParamValidated(required = true, msg = "当前期数")
    private Integer currentTerm;

    /**
     * 本次最后还款日期
     */
    @RequestParamValidated(required = true, msg = "本次最后还款日期", format = DowsureDateUtils.YYYYMMDDHHMMSS)
    private String lastTime;

    /**
     *币种（ISO 4217 currency codes）
     * CNY（人民币）默认:CNY
     */
    @RequestParamValidated(msg = "币种")
    private CurrencyEnums currency;

    /**
     * 本次还款的应付本金金额
     */
    @RequestParamValidated(required = true, msg = "本次还款的应付本金金额")
    private BigDecimal principalDueAmount;

    /**
     * 本次还款的应付利息金额
     */
    @RequestParamValidated(required = true, msg = "本次还款的应付利息金额")
    private BigDecimal interestDueAmount;

    /**
     * 本次应付还款的总金额
     */
    @RequestParamValidated(required = true, msg = "本次应付还款的总金额")
    private BigDecimal totaltDueAmount;

    /**
     * 利率
     */
    @RequestParamValidated(required = true, msg = "利率")
    private BigDecimal interestRate;
}
